package com.xpffly.design.builder;

/**
 * @Author: xpengfei
 * @Date: 2021/3/28 13:51
 * @Description：建造者模式 场景类
 */
public class Scene {
    public static void main(String[] args) {
        Director director = new Director();
        // 生产10台奔驰A
        for (int i = 0; i < 10; i++) {
            director.getBenzModelA().run();
            System.out.println("*************************");
        }
        System.out.println("------------------------------------------------");
        // 生产5台奔驰B
        for (int i = 0; i < 5; i++) {
            director.getBenzModelB().run();
            System.out.println("*************************");
        }
        System.out.println("------------------------------------------------");
        //生产10台宝马 A
        for (int i = 0; i < 10; i++) {
            director.getBmModelA().run();
            System.out.println("*************************");
        }
        System.out.println("------------------------------------------------");
        //生产5台宝马 B
        for (int i = 0; i < 5; i++) {
            director.getBmModelB().run();
            System.out.println("*************************");
        }
        System.out.println("------------------------------------------------");
    }
}
